<template>
  <div class="hello">
    <h1>{{ msg }}</h1>

  </div>
</template>

<script>
import axios from 'axios'
export default {
  name: 'toBackUp',
  data() {
    return {
      msg: 'toBackUp'
    }
  },
  mounted() {
    this.toBackUp()
  },
  methods: {
    toBackUp() {
      var url = this.HOST + '/hello/grid'
      // api方法
      axios
        .get(url)
        .then(response => {
          this.msg = response.data
        })
        .catch(function (error) { // 请求失败处理
          console.log(error)
        })
    }
  }
}
</script>
